package com.board.form;
//订单中的菜品信息

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("菜品信息参数对象")
public class FoodOrderForm {
    @ApiModelProperty("菜品id")
    @NotNull(message = "菜品id不能为空")
    private Integer foodId;
    @ApiModelProperty("菜品数量")
    @NotNull(message = "菜品数量不能为空")
    @Min(value = 1,message = "菜品数量不能小于1")
    @Max(value = 10,message = "菜品数量不能大于10")
    private Integer foodNum;
}
